import { Service } from 'egg'

// function toInt(str) {
//   if (typeof str === 'number')
//     return str
//   if (!str)
//     return str
//   return parseInt(str, 10) || 0
// }

export default class TableService extends Service {
  async list() {
    // const { ctx } = this

    // const query = {
    //   limit: toInt(ctx.query.limit),
    //   offset: toInt(ctx.query.offset),
    // }
    // const menuList = await ctx.model.Menu.findAll(query)

    const tableList = [{
      name: '李四',
      age: 24,
      gender: 'female',
      checkbox: ['nanjing', 'beijing'],
      select: 1,
      switch: false,
      date: ['2024-06-21', '2024-06-25'],
      time: '',
    }]
    return tableList
  }
}